home *** CD-ROM | disk | FTP | other *** search
/ Trains: The Screensaver / Trains: The Screen Saver.iso / setup.ins < prev   
Text File  |  1995-08-14  |  28KB  |  947 lines

  1. ;; TRAINS! the screen saver instalit script
  2.  
  3. DefineVariables
  4.  
  5. ;; set these according to each program
  6. ;; these also need changed around line 100 to reflect K's
  7. Number [CriscrosSize]      := 1950000
  8. Number [DeskmoveSize]      := 1570000
  9. Number [ExpressSize]       := 1772000
  10. Number [MovieSize]         := 460000
  11. Number [PuzltrakSize]      := 530000
  12. Number [SceneSize]         := 1995000
  13. Number [SlideshowSize]     := 4600000
  14. Number [SwitchSize]        := 585000
  15. Number [TracksSize]        := 50000
  16. Number [ClockSize]         := 110000
  17.  
  18. ;; this is calculated below
  19. Number [TotalByteSize]   :=  78000000
  20. Number [Check1] := 1
  21. Number [Check2] := 1
  22. Number [Check3] := 1
  23. Number [Check4] := 1
  24. Number [Check5] := 1
  25. Number [Check6] := 1
  26. Number [Check7] := 1
  27. Number [Check8] := 1
  28. Number [Check9] := 1
  29. Number [Check0] := 1
  30. Number [ChecksDone]  := 1
  31. Text   [SDir] := D:
  32. Text   [DDir] := C:\Trainsvr
  33. Number [VFW] := 1
  34.  
  35. Text [CrisCrosDir]   := \Criscros
  36. Text [DeskmoveDir]   := \Deskmove
  37. Text [ExpressDir]    := \Express
  38. Text [MovieDir]      := \MoviePly
  39. Text [PuzltrakDir]   := \Puzltrak
  40. Text [SceneDir]      := \Scene
  41. Text [SlideshowDir]  := \Slideshw
  42. Text [SwitchDir]     := \Switchyd
  43. Text [TracksDir]     := \Tracks
  44. Text [ClockDir]      := \RRClock
  45.  
  46. Number [Movie1] := 1
  47. Number [Movie2] := 0
  48. Number [Movie3] := 0
  49. Number [Movie4] := 1
  50. Number [Movie5] := 0
  51. Number [Movie6] := 0
  52. Number [Movie7] := 0
  53. Number [Movie8] := 0
  54. Number [Movie9] := 1
  55. Number [Movie10] := 0
  56. Number [Movie11] := 0
  57. Number [Movie12] := 0
  58. Number [Movie13] := 0
  59. Number [Movie14] := 0
  60. Number [Movie15] := 0
  61. Number [Movie16] := 0
  62. Number [Movie17] := 0
  63. Number [Movie18] := 0
  64. Number [Movie19] := 0
  65. Number [Movie20] := 0
  66.  
  67. EndDefineVariables
  68.  
  69. SetReplacementInquiry Off
  70.  
  71. [InstallationDirectory] := C:\TRAINSVR
  72.  
  73. SetTopLineTo TRAINS! the screen saver   Copyright (C) 1995 Abracadata, Ltd.
  74. SetBackGroundColor 0 0 128 0 0 8
  75. ShowWindow Maximized
  76. ShowBitmap 1
  77.  
  78. Dialog WhiteOnBlue
  79.   Thank you for purchasing TRAINS! the screen saver.
  80.   Carefully follow the instructions to install it to your hard drive.
  81. EndDialog
  82.  
  83. [TotalByteSize] := [CriscrosSize]+[DeskmoveSize]+[ExpressSize]+[MovieSize]+[PuzltrakSize]+[SceneSize]+[SlideshowSize]+[SwitchSize]+[TracksSize]+[ClockSize]
  84.  
  85. :Main
  86. ClearScreen
  87. DialogBox 160 150 UseHeader "TRAINS! the screen saver INSTALLATION" Returns [ChecksDone] ModalFrame SysMenu BorDlg
  88.   BorGroup @xy(12,4) 140 120 "Choose Which Modules To Install" BorCenter BorCaption
  89.   BorCheckBox @xy(30,20) 110 10 "Crazy Tracks  [50k]" uses [Check9]
  90.   BorCheckBox @xy(30,30) 110 10 "CrissCross  [1950k]" uses [Check1]
  91.   BorCheckBox @xy(30,40) 110 10 "Desktop Mover  [1570k]"uses [Check2]
  92.   BorCheckBox @xy(30,50) 110 10 "Express Train  [1772k]" uses [Check3]
  93.   BorCheckBox @xy(30,60) 110 10 "Movie Player  [460k+Movies]" uses [Check4]
  94.   BorCheckBox @xy(30,70) 110 10 "Puzzle Track  [530k]" uses [Check5]
  95.   BorCheckBox @xy(30,80) 110 10 "Railroad Clock [109k]" uses [Check0]
  96.   BorCheckBox @xy(30,90) 110 10 "Railroad Scenery [1995k]" uses [Check6]
  97.   BorCheckBox @xy(30,100) 110 10 "Slide Show  [4600k]" uses [Check7]
  98.   BorCheckBox @xy(30,110) 110 10 "Switching Yard  [585k]" uses [Check8]
  99.   BorDivider  @xy(0,127) 160 3 BorHDip
  100.   BorDivider  @xy(0,132) 160 3 BorHDip
  101.   BorDivider  @xy(0,137) 160 3 BorHDip
  102.   BorDivider  @xy(0,142) 160 3 BorHDip
  103.   BorDivider  @xy(0,147) 160 3 BorHDip
  104.   BorPushButton @xy(30,127)  37 25 "Ok" OK
  105.   BorPushButton @xy(100,127) 37 25 "Cancel"   CANCEL
  106. EndDialogBox
  107.  
  108. if [ChecksDone] = 2
  109.     goto Main
  110. EndIf
  111.  
  112. if [Check1]+[Check2]+[Check3]+[Check4]+[Check5]+[Check6]+[Check7]+[Check8]+[Check9]+[Check0] = 0
  113.     ClearScreen
  114.     Dialog PressAKey WhiteOnBlue
  115.         You need to select savers to install.  Press ESC to exit.
  116.     EndDialog
  117.     goto Main
  118. endif
  119.  
  120. ;; do AVI movie dialog
  121. if [Check4] = 1
  122.  
  123. Do CheckMovies
  124.  
  125. endif
  126.  
  127.  
  128. if [Check1] = 1
  129. [TotalByteSize] := [TotalByteSize]+[CriscrosSize]
  130. endif
  131. if [Check2] = 1
  132. [TotalByteSize] := [TotalByteSize]+[DeskmoveSize]
  133. endif
  134. if [Check3] = 1
  135. [TotalByteSize] := [TotalByteSize]+[ExpressSize]
  136. endif
  137. if [Check4] = 1
  138. [TotalByteSize] := [TotalByteSize]+[MovieSize]
  139. Do AddMovieSize
  140. endif
  141. if [Check5] = 1
  142. [TotalByteSize] := [TotalByteSize]+[PuzltrakSize]
  143. endif
  144. if [Check6] = 1
  145. [TotalByteSize] := [TotalByteSize]+[SceneSize]
  146. endif
  147. if [Check7] = 1
  148. [TotalByteSize] := [TotalByteSize]+[SlideshowSize]
  149. endif
  150. if [Check8] = 1
  151. [TotalByteSize] := [TotalByteSize]+[SwitchSize]
  152. endif
  153. if [Check9] = 1
  154. [TotalByteSize] := [TotalByteSize]+[TrackSize]
  155. endif
  156. if [Check0] = 1
  157. [TotalByteSize] := [TotalByteSize]+[ClockSize]
  158. endif
  159.  
  160. DetermineInstallationDrive TotalByteSize RequireFixed
  161. [InstallationDirectory] := InstallationDrive:\TRAINSVR
  162. DetermineInstallationDirectory [InstallationDirectory] TotalByteSize RequireFixed
  163.  
  164. [DDir] := [WindowsDirectory]
  165.  
  166. ;;ALWAYS copy Trainsvr.ini to windows
  167. CopyFiles from [InstallFromDrive]:\WinDir to [DDir]
  168. Trainsvr.ini
  169. EndCopyFiles
  170. SetFileAttrTo 00 for [DDir]\TrainSvr.Ini
  171.  
  172. ;;ALWAYS copy Readme.txt to installationdir
  173. CopyFiles from [InstallFromDrive]: to [InstallationDirectory]
  174. Readme.txt
  175. EndCopyFiles
  176. SetFileAttrTo 00 for [InstallationDirectory]\Readme.txt
  177.  
  178. ;;ALWAYS copy \launcher\trains.exe to installationdir
  179. CopyFiles from [InstallFromDrive]:\launcher to [InstallationDirectory]
  180. TRAINS!.EXE
  181. EndCopyFiles
  182. SetFileAttrTo 00 for [InstallationDirectory]\TRAINS!.EXE
  183.  
  184. ;;ALWAYS copy vbrun300.dll & threed.vbx to windows\system
  185. CopyFiles from [InstallFromDrive]:\WinSys to [DDir]\system
  186. VBRUN300.Dll
  187. Threed.vbx
  188. EndCopyFiles
  189. SetFileAttrTo 00 for [DDir]\System\Vbrun300.dll
  190.  
  191. ;;grp2 ver.dll,commdlg.dll,gauge.vbx,mci.vbx,cmdialog.vbx
  192. if [Check4] = 1
  193.     [SDir] := [InstallFromDrive]:\WinSys
  194.     CopyFiles from [SDir] to [DDir]\system
  195.     Ver.Dll
  196.     CommDlg.dll
  197.     Gauge.Vbx
  198.     Mci.Vbx
  199.     Cmdialog.Vbx
  200. ;;    GifBox.Vbx
  201.     EndCopyFiles
  202.     SetFileAttrTo 00 for [DDir]\system\Ver.Dll
  203.     SetFileAttrTo 00 for [DDir]\system\CommDlg.dll
  204.     SetFileAttrTo 00 for [DDir]\system\Gauge.Vbx
  205.     SetFileAttrTo 00 for [DDir]\system\Mci.Vbx
  206.     SetFileAttrTo 00 for [DDir]\system\Cmdialog.Vbx
  207. ;;    SetFileAttrTo 00 for [DDir]\system\GifBox.Vbx
  208. EndIf
  209.  
  210.  
  211. ;;grp4 owl250.dll,bids45.dll,bc450rtl.dll
  212. if [Check2]+[Check3]+[Check7] = 0
  213. else
  214.     [SDir] := [InstallFromDrive]:\WinSys
  215.     CopyFiles from [SDir] to [DDir]\system
  216.     Owl250.dll
  217.     Bids45.dll
  218.     Bc450rtl.dll
  219.     GifBox.vbx
  220.     Bivbx11.dll
  221.     EndCopyFiles
  222.     SetFileAttrTo 00 for [DDir]\system\Owl250.dll
  223.     SetFileAttrTo 00 for [DDir]\system\Bids45.dll
  224.     SetFileAttrTo 00 for [DDir]\system\Bc450rtl.dll
  225.     SetFileAttrTo 00 for [DDir]\system\GifBox.vbx
  226.     SetFileAttrTo 00 for [DDir]\system\Bivbx11.dll
  227. EndIf
  228.  
  229. ;;done with WINSYS stuff
  230.  
  231.  
  232. ;;now do each savers files... .scr to windows, rest to priv dir
  233.  
  234. if [Check1] = 1
  235.     [SDir] := [InstallFromDrive]:[CrisCrosDir]
  236. ;;    [DDir] := [InstallationDirectory][CrisCrosDir]
  237.     [DDir] := [WindowsDirectory]
  238.  
  239.     CopyFiles from [InstallFromDrive]:\WinDir to [DDir]
  240.     CrisCros.Scr
  241.     EndCopyFiles
  242.  
  243.     Do CopyAll
  244.  
  245.     SetFileAttrTo 00 for [DDir]\CrisCros.Scr
  246.     SetFileAttrTo 00 for [DDir]\TBUILD.WAV
  247.     SetFileAttrTo 00 for [DDir]\TDESTROY.WAV
  248.     SetFileAttrTo 00 for [DDir]\TDIESEL.WAV
  249.     SetFileAttrTo 00 for [DDir]\TSTEAM.WAV
  250. EndIf
  251.  
  252.  
  253. if [Check2] = 1
  254.     [SDir] := [InstallFromDrive]:[DeskmoveDir]
  255.     [DDir] := [InstallationDirectory][DeskmoveDir]
  256.  
  257.     CopyFiles from [InstallFromDrive]:\WinDir to [WindowsDirectory]
  258.     DeskMove.Scr
  259.     EndCopyFiles
  260.  
  261.     Do CopyAll
  262.  
  263.     SetFileAttrTo 00 for [WindowsDirectory]\DeskMove.Scr
  264.     SetFileAttrTo 00 for [DDir]\Train1.wav
  265.     SetFileAttrTo 00 for [DDir]\Train2.wav
  266.     SetFileAttrTo 00 for [DDir]\Train3.wav
  267. EndIf
  268.  
  269.  
  270. if [Check3] = 1
  271.     [SDir] := [InstallFromDrive]:[ExpressDir]
  272.     [DDir] := [InstallationDirectory][ExpressDir]
  273.  
  274.     CopyFiles from [InstallFromDrive]:\WinDir to [WindowsDirectory]
  275.     Express.Scr
  276.     EndCopyFiles
  277.  
  278.     Do CopyAll
  279.  
  280.     SetFileAttrTo 00 for [WindowsDirectory]\Express.Scr
  281.     SetFileAttrTo 00 for [DDir]\Train1.